function [yellowStatsTotal, blueStatsTotal] = parseExperiments(dirName)
	
teamBlue = ["blue0"; "blue1"; "blue2"; "blue3"; "blue4"];
teamYellow = ["yellow0"; "yellow1"; "yellow2"; "yellow3"; "yellow4"];

files = readdir(dirName);

statsDirs = [];

for i = 1 : rows(files)
      index = strfind(files{i}, "_stats");
      if any(index) == 1
      	statsDirs = [statsDirs; files{i}];
      endif
endfor

printf("Found %d dirs with the statistics\n",  rows(statsDirs));

blueStatsTotal = [0 0 0];
yellowStatsTotal = [0 0 0];

for i = 1 : rows(statsDirs)
     printf(".");
      statsDir = [dirName, "/", statsDirs(i,:)];
      %getting paths to team members statistic files
      yellowStatFiles = strcat(statsDir, "/", teamYellow, ".stats");
      blueStatFiles = strcat(statsDir, "/", teamBlue, ".stats");
      
      yellowStatsSingleExp = [0 0 0];
      for j = 1 : rows(yellowStatFiles)
     	yellowStatsSingleExp += countStats(yellowStatFiles(j,:));
     endfor
     
      blueStatsSingleExp = [0 0 0];
      for j = 1 : rows(blueStatFiles)	
     	blueStatsSingleExp += countStats(blueStatFiles(j,:));
     endfor
     
     yellowStatsTotal += yellowStatsSingleExp;
     blueStatsTotal += blueStatsSingleExp;
endfor

printf("\n");

yellowStatsTotal /= rows(statsDirs);
blueStatsTotal /= rows(statsDirs);

printf("Shoots, passes, captures (avg.)\n");
yellowStatsTotal
blueStatsTotal

%figure(1)
%summaryStats = [yellowStatsTotal; blueStatsTotal]'
%h = bar([1 2 3],summaryStats);
%set(gca,'XTick',[1:3]);
%set(gca,'xticklabel',["shots"; "passes"; "captures"]);

%set(h(1), "facecolor", "y")
%set(h(2), "facecolor", "b")

endfunction